/*
 * @Author: 刘经标 2604132672@qq.com
 * @Date: 2025-05-06 16:55:43
 * @LastEditors: 刘经标 2604132672@qq.com
 * @LastEditTime: 2025-05-06 16:55:48
 * @FilePath: /ai-assistant-frontend/src/components/ImagePreview.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react';
import Lightbox from 'yet-another-react-lightbox';
import 'yet-another-react-lightbox/styles.css';

interface ImagePreviewProps {
  url: string;
  isOpen: boolean;
  onClose: () => void;
}

export const ImagePreview: React.FC<ImagePreviewProps> = ({ url, isOpen, onClose }) => {
  return (
    <Lightbox
      open={isOpen}
      close={onClose}
      slides={[{ src: url }]}
      render={{ buttonPrev: () => null, buttonNext: () => null }}
    />
  );
};